package ooday04;

public class InterTest {
    public static void main(String[] args) {
        Mama m=new Mama();

        //Baby b =new Mama.Baby(); //编译错误只能在内部类里new

    }
}
class Mama{
    String name;
    void  create(){
        Baby b= new Baby();


    }
    class  Baby{
        //Mama m=new Mama();
        //内部类可以直接访问外部类成员，隐式引用指向创建它的外部类对象

        void show(){


            System.out.println(name);
            System.out.println(Mama.this.name);
            //System.out.println(this.name);//编译错误，this指当前baby对象
        }

    }
}
